import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/home.vue'
import scheme from '../views/scheme.vue'
import product from '../views/product/index.vue'
import ceshi from '../views/ceshi.vue'
const originPush = VueRouter.prototype.push;
VueRouter.prototype.push = function(params){
  return originPush.call(this,params).catch(err=>err)
}


Vue.use(VueRouter)

const routes = [
  // {
  //   path:'/',
  //   name:'ceshi',
  //   component:ceshi
  // },
  {
    path: '/',
    name: 'home',
    component: home,
  },
  {
    path: '/scheme',
    name: 'scheme',
    component: scheme,
  },
  {
    path: '/product',
    name: 'product',
    component: product,
  },
  {
    path:'/product/qht',
    name:'qht',
    component:()=>import('../views/product/qht.vue')
  },
  {
    path:'/product/ipsystem',
    name:'ipsystem',
    component:()=>import('../views/product/ipsystem.vue')
  },
  {
    path:'/product/mbmh',
    name:'mbmh',
    component:()=>import('../views/product/mbmh.vue')
  },
  {
    path:'/marketing',
    name:'marketing',
    component:()=>import('../views/marketing.vue')
  },
  {
    path:'/aboutus',
    name:'aboutus',
    component:()=>import('../views/aboutus.vue')
  },
  {
    path:'/ceshi',
    name:'ceshi',
    component:ceshi
  }
]

const router = new VueRouter({
  routes
})

export default router
